/*
 * @Author: your name
 * @Date: 2021-10-05 19:45:33
 * @LastEditTime: 2021-10-05 20:59:26
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: \vue3.0\vue3_vite\vite.config.js
 */
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
import path from 'path'

function resolve(dir) {
  return path.resolve(__dirname, dir)
}

export default defineConfig({
  plugins: [
    vue(),
    vueJsx(),
  ],
  resolve: {
    extensions: ['.js', '.vue', '.json'],
    alias: {
      '@': resolve('src'),
      '@store': resolve('src/store'),
      '@comp': resolve('src/components'),
      '@img': resolve('src/assets/image'),
    }
  },
})